import request from '@/utils/request'

// 查询产品详情
export function getInfoProduct(query) {
    return request({
        url: '/system/product/config/getInfo',
        method: 'get',
        params: query
    })
}
// 新增产品
export function addProduct(data) {
    return request({
        url: '/system/product/config/add',
        method: 'post',
        data
    })
}
// 修改产品
export function editProduct(data) {
    return request({
        url: '/system/product/config/edit',
        method: 'post',
        data
    })
}
// 查询产品码
export function getProductCodesProduct(query) {
    return request({
        url: '/system/product/config/getProductCodes',
        method: 'get',
        params: query
    })
}
// 查询产品列表
export function listProduct(query) {
    return request({
        url: '/system/product/config/list',
        method: 'get',
        params: query
    })
}
// 删除产品
export function removeProduct(data) {
    return request({
        url: '/system/product/config/remove',
        method: 'post',
        data
    })
}

// 删除数据前校验
export function deleteForCheck(data) {
  return request({
    url: '/system/product/config/deleteCheck',
    method: 'post',
    data: data
  })
}
